package com.ruoyi.quality.controller;

import com.ruoyi.common.core.domain.R;
import com.ruoyi.quality.domain.dto.InspectionTaskTemplateSamplingItemDto;
import com.ruoyi.quality.domain.dto.InspectionTaskValueDetailDto;
import com.ruoyi.quality.service.InspectionTaskService;
import com.ruoyi.quality.service.InspectionTaskValueService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/inspectionTaskValue")
public class InspectionTaskValueController {

    @Autowired
    InspectionTaskValueService inspectionTaskValueService;

    @PostMapping("/addInspectionTaskValues")
    public R fillInspectionSamplingTaskValue(@RequestBody List<InspectionTaskValueDetailDto> inspectionTaskValueDetailDtos)
    {
        inspectionTaskValueService.addInspectionTaskValues(inspectionTaskValueDetailDtos);
        return R.ok("数据保存成功");
    }
}
